package com.atos.optical.controller;

import com.atos.optical.common.ApiResult;
import com.atos.optical.common.BaseHttpController;
import com.atos.optical.model.bo.SysUserMenuRelBo;
import com.atos.optical.service.SysUserMenuRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wanghra
 * @version 1.0
 * @description
 * @date 2025/8/13
 */
@RestController
@RequestMapping("/user/menu/rel")
public class SysUserMenuRelController extends BaseHttpController {
    @Autowired
    private SysUserMenuRelService service;
    
    @PostMapping("/add")
    public ApiResult<Boolean> addUserMenuRel(@RequestBody SysUserMenuRelBo bo) {
        return new ApiResult<>(service.addUserMenuRel(bo));
    }
    
    @PostMapping("/delete")
    public ApiResult<Boolean> deleteUserMenuRel(@RequestBody SysUserMenuRelBo bo) {
        return new ApiResult<>(service.deleteUserMenuRel(bo));
    }
}
